home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / bin / select_mountoptions < prev    next >
Encoding:
Text File  |  2007-02-15  |  610 b   |  34 lines

  1. #!/bin/sh
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. dev=$1
  6. id=$2
  7. tpl=$3
  8. part=$dev/$id
  9. filesystem=$(cat $part/acting_filesystem)
  10.  
  11. cd $dev
  12.  
  13. full_options=''
  14. for op in $(cat /lib/partman/mountoptions/$filesystem); do
  15.     if [ -f $part/options/$op ]; then
  16.     if [ "$full_options" ]; then
  17.         full_options="$full_options,$(cat $part/options/$op)"
  18.     else
  19.         full_options="$(cat $part/options/$op)"
  20.     fi
  21.     fi
  22. done
  23. db_set $tpl "$full_options"
  24. db_input critical $tpl || true
  25. db_go || exit
  26. db_get $tpl
  27. rm -rf $part/options
  28. mkdir $part/options
  29. IFS=,
  30. for op in $RET; do
  31.     op=${op# }
  32.     echo "$op" >$part/options/${op%% *}
  33. done
  34.